package cn.fl.project.transform;

import cn.cmm.base.framework.utils.CollectionUtils;
import cn.fl.project.dto.ProjectFlowSHDTO;
import cn.fl.project.vo.ProjectFlowSHVO;
import cn.fl.project.vo.VehicleStyleVO;
import cvm.store.facade.cvm.dto.VechileStyleDTO;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者:hongyanbo
 * 时间:2018/8/11
 */
public class VehicleStyleVOTransform {

    public static VehicleStyleVO toVO(VechileStyleDTO dto){
        VehicleStyleVO vo = new VehicleStyleVO();
        if(dto!=null){
            //TODO
            vo.setId(dto.getId());
            vo.setStyleMsrp(dto.getStyleMsrp());
            vo.setStyleLength(dto.getStyleLength());
            vo.setStyleName(dto.getStyleName());
            vo.setStylePurposeName(dto.getStylePurposeName());
            vo.setStylePurposeId(dto.getStylePurposeId());
            vo.setStyleBulletinModel(dto.getStyleBulletinModel());
            Long styleId = dto.getStyleId();
        }
        return vo;
    }

    public static List<VehicleStyleVO> toVOList(List<VechileStyleDTO> list) {
        List<VehicleStyleVO>  voList = new ArrayList<VehicleStyleVO>();
        if(CollectionUtils.isNotEmpty(list)){
            for (VechileStyleDTO dto : list) {
                voList.add(toVO(dto));
            }
        }
        return voList;
    }
}
